import request from '../../../../../public/js/common/api/api.js';

const AuditUrl = Utils.CurDomain.AuditUrl

const _ajaxOptions = {
    contentType: 'application/json',
    dataType: 'json',
    async: true,
    dataFilter(data, type) {
        return data;
    }
};

/**
 * 入场登记接口
 */
export default class entryRegistrationApi {
    /**
     * 入场登记新增
     * @data {}
     * @returns 
     */
    static addEntryRegistration(data) {
        return request.post(`${AuditUrl}/entryregistrations`, data, _ajaxOptions);
    }

    /**
     * 入场登记提交
     * @id {}
     * @returns 
     */
    static submitPutEntryRegistration(id) {
        return request.put(`${AuditUrl}/entryregistrations/submit/${id}`);
    }

    /**
    * 入场登记列表
    * @param {}
    * @returns 
    */
    static entryRegistrationList(param) {
        return request.post(`${AuditUrl}/entryregistrations/list`, param);
    }
    /**
    * 入场登记详情
    * @id {}
    * @returns 
    */
    static queryEntryRegistration(id) {
        return request.get(`${AuditUrl}/entryregistrations/${id}`);
    }
    /**
    * 入场登记删除
    * @id {}
    * @returns 
    */
    static delEntryRegistration(id) {
        return request.delete(`${AuditUrl}/entryregistrations/${id}`);
    }
    /**
    * 入场登记反提交
    * @id {}
    * @returns 
    */
    static resubmitPutEntryRegistration(id) {
        return request.put(`${AuditUrl}/entryregistrations/resubmit/${id}`);
    }

    /**
     * 入场登记审核
     * @id {}
     * @returns 
     */
    static auditPutEntryRegistration(id) {
        return request.put(`${AuditUrl}/entryregistrations/audit/${id}`);
    }

    /**
     * 入场登记反审核
     * @id {}
     * @returns 
     */
    static reauditPutEntryRegistration(id) {
        return request.put(`${AuditUrl}/entryregistrations/reaudit/${id}`);
    }

}